import request from '@/router/axios'

export function fetchBaseList(type, id, query) {
  return request({
    url: `/product/attr/${type}/list/${id}`,
    method: 'get',
    params: query
  })
}

export function fetchSaleList(type, id, query) {
  return request({
    url: `/product/attr/${type}/list/${id}`,
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/product/attrgroup',
    method: 'post',
    data: obj
  })
}

export function delObj(id) {
  return request({
    url: '/product/attrgroup/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/product/attr',
    method: 'put',
    data: obj
  })
}
